package com.hunan.api.catv.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 竞猜记录表
 * </p>
 *
 * @author jiangzhuan
 * @since 2021-06-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("guessing_record")
public class GuessingRecord extends Model<GuessingRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 竞猜用户id
     */
    private Integer memberId;

    /**
     * 竞猜的时间点
     */
    private Date guessingTime;

    /**
     * 竞猜结果状态 0:未开奖 1：猜中 ,2:没猜中
     */
    private Integer state;

    /**
     * 活动类型： 2：欧洲杯竞猜活动
     */
    private Integer activityType;

    /**
     * 竞猜具体项id
     */
    private Integer matchItemId;

    /**
     * 逻辑删除 0:已删除 1:未删除
     */
    private Integer deleted;

    /**
     * 猜测的比赛结果 0：平局 1：主场胜 2：客场胜
     */
    private Integer guessingMatchResult;

    /**
     * 竞猜快照，记录竞猜时刻信息，json格式
     */
    private String guessingSnapshot;

    /**
     * 猜测的队伍
     */
    private String guessingTeam;


    public static final String ID = "id";

    public static final String MEMBER_ID = "member_id";

    public static final String GUESSING_TIME = "guessing_time";

    public static final String STATE = "state";

    public static final String ACTIVITY_TYPE = "activity_type";

    public static final String MATCH_ITEM_ID = "match_item_id";

    public static final String DELETED = "deleted";

    public static final String GUESSING_MATCH_RESULT = "guessing_match_result";

    public static final String GUESSING_SNAPSHOT = "guessing_snapshot";

    public static final String GUESSING_TEAM = "guessing_team";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
